package com.example.baseapp.admin.validator.interfaces;

import com.example.baseapp.admin.validator.MenuValidation;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.*;

/**
 * NotConflictUser interface
 * 校验用户信息是否重复
 * @author zhangl
 * @date 2022/3/23 17:30
 */
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({FIELD,METHOD,PARAMETER,TYPE})
@Constraint(validatedBy = MenuValidation.MenuParentIdNotExistsValidator.class)
public @interface MenuParentIdExists {
    String message() default "上级菜单不存在";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
